package com.matt.domain.observation;

import com.matt.commons.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2018/3/15
 * *******************************
 */
@Entity
@Table(name = "observation_new_record")
@Data
@EqualsAndHashCode(callSuper = true)
public class ObservationNewRecord extends Domain{

    @Column(columnDefinition = "int default 0 COMMENT '班级类型：1托班，2早教'")
    private Integer category;

    @Column(columnDefinition = "int default 0 COMMENT '课程类型：1，SAT早教课程，2，园区自建，3，公共课程'")
    private Integer courseType;

    @Column(columnDefinition = "varchar(32) COMMENT '对应托班课程id '")
    private String coursePlanClassesId;

    @Column(columnDefinition = "int default 0 COMMENT '得分'")
    private Integer score=0;

    @Column(columnDefinition = "varchar(32) COMMENT '老师id'")
    private String teacherId;

    @Column(columnDefinition = "varchar(32) COMMENT '宝宝id'")
    private String childrenId;

    @Column(columnDefinition = "varchar(32) COMMENT '老师名字'")
    private String teacherName;



    public static ObservationNewRecord of(Integer category, String coursePlanId, String teacherId,String teacherName, String childrenId, Integer courseType){
        ObservationNewRecord record = new ObservationNewRecord();
        record.setCategory(category);
        record.setCourseType(courseType);
        record.setCoursePlanClassesId(coursePlanId);
        record.setTeacherId(teacherId);
        record.setChildrenId(childrenId);
        record.setTeacherName(teacherName);
        return record;
    }
}
